﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MetadataBasedConfig.Framework.Model;

namespace MetadataBasedConfig.Framework
{
    public interface IConfigMetadataProvider : IDisposable
    {
        T2 CreateMetadata<T1,T2>() where T2:class,T1;

        T2 CreateMetadata<DataKeyType,T2>(DataKeyType key) 
            where T2:class,IDataKeyModel<DataKeyType> ;

        void AddMetadata<T1, T2>(T1 metatdata) where T2 : class,T1;

        void DeleteMetadata<T1, T2>(T1 metadata) where T2 : class,T1;

        void Save();

        IConfigMeta GetConfigMeta(string configMetaTypeModelKey, string content);

        IEnumerable<IConfigMetaConfigInfo> GetConfigInfos(Int64 configMetaModelKey);

        IEnumerable<IConfigMetaConfigInfoData> GetConfigMetaConfigDatasOfMetaInfo(Int64 configInfoModelKey, Int64 dataID);

    }
}
